package com.wnhz.wnmap.smovie.genre.service.impl;

import com.wnhz.wnmap.domain.entity.Genre;
import com.wnhz.wnmap.smovie.genre.dao.IGenreDao;
import com.wnhz.wnmap.smovie.genre.service.IGenreService;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class GenreServiceImpl implements IGenreService {
    @Autowired
    private IGenreDao genreDao;

    @Override
    public List<Genre> findAll() {
        return genreDao.findAll();
    }

    @Override
    public List<Genre> findByNameLike(String name) {
        return genreDao.findByNameLike("%" + name + "%");
    }


}
